package org.example.userservice.pojo;


public class MyEntity {

    private int pID;
    private String Name;
    private String Price;
    private String Describe;
    private String ImageURL;

    // 省略getter和setter方法

    // 使用MyBatis保存实体到数据库


    @Override
    public String toString() {
        return "MyEntity{" +
                "pID=" + pID +
                ", Name='" + Name + '\'' +
                ", Price='" + Price + '\'' +
                ", Describe='" + Describe + '\'' +
                ", ImageURL='" + ImageURL + '\'' +
                '}';
    }
    public int getpID() {
        return pID;
    }

    public void setpID(int pID) {
        this.pID = pID;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getPrice() {
        return Price;
    }

    public void setPrice(String price) {
        Price = price;
    }

    public String getDescribe() {
        return Describe;
    }

    public void setDescribe(String describe) {
        Describe = describe;
    }

    public String getImageURL() {
        return ImageURL;
    }

    public void setImageURL(String imageURL) {
        ImageURL = imageURL;
    }


//
//    public void save() {
//        SqlSession session = sqlSessionFactory.openSession();
//        try {
//            MyEntityMapper mapper = session.getMapper(MyEntityMapper.class);
//            mapper.insert(this);
//            session.commit();
//        } finally {
//            session.close();
//        }
//    }
}